<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script type="text/javascript" src="<%=path %>/js/plugins/ajaxfileupload.js"></script>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">修改个人信息</h3>
	</div>
	<form id="user_update_form" class="form-horizontal mt20 p20" action="javascript:updateUserInfo()">
		<div class="form-group">
			<label class="col-sm-2 control-label">昵称：</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="userName" value="${user.userName}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">E-mail：</label>
			<div class="col-sm-10">
				<input type="email" class="form-control" name="email" value="${user.email}" >
			</div>
		</div>
		
		<d:checkBox labelClass="col-sm-2 control-label" describe="个人介绍" tableColumn="user_label" fieldName="userLabel" value="${user.userLabel}"></d:checkBox>


		<div class="form-group"><div class="col-sm-2"></div>
			<div class="col-sm-10">
				<textarea name="userIntroduction" rows="4" class="form-control" placeholder="200字以内">${user.userIntroduction}</textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-10 col-sm-offset-2">
				<button type="submit" class="btn btn-primary" id="user_update_btn">确定</button>
			</div>
		</div>
	</form>
</div>

<script type="text/javascript">
	$(document).ready(function(){		
		$('input[type=checkbox]').click(function(){
			if($("input[name='userLabel']:checked").length > 3)
			{
				layer.alert("个人专长最多选择3项");	
				return false;		
			}
		});		

	})
</script>